import request from '@/utils/request'

// 获取运维工单列表
export const getWorkOrderList = (params) => request.get('/task-service/task/search', {
  params
})

// 获取工单状况列表
export const getWorkStatus = () => request.get('/task-service/task/allTaskStatus')

// 获取工单详情
export const detail = id => request.get(`/task-service/task/taskInfo/${id}`)

// 获取运维人员列表
export const maintenanceList = innerCode => request.get(`/user-service/user/repairerList/${innerCode}`)

// 获取运营人员
export const operatorList = innerCode => request.get(`/user-service/user/operatorList/${innerCode}`)
// 获取工单类型
export const taskType = () => request.get('/task-service/taskType/list')

// 创建
export const createDetail = data => request.post('/task-service/task/create', data)

// 取消工单状态
export const cancalAPI = id => request.post(`/task-service/task/cancel/${id}`)

// 获取补货阀值
export const supplyAlertValue = () => request.get('/task-service/task/supplyAlertValue')

// 运营补货类型
export const list = data => request.get('/task-service/taskType/list', {
  data
})

// 获取补货列表
export const channeList = innerCode => request.get(`/vm-service/channel/channelList/${innerCode}`)
